]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Remove 'backwards' argument from SwitcherPopup:_keyPressHandler
authorChristophe Fergeau <cfergeau@redhat.com>
Tue, 12 Aug 2014 15:55:22 +0000 (17:55 +0200)
committerChristophe Fergeau <cfergeau@redhat.com>
Sun, 17 Aug 2014 17:33:22 +0000 (19:33 +0200)
All derived classes are already checking explicitly for action names
(FOO and FOO_BACKWARDS). mutter used to have a META_KEY_BINDING_REVERSES
flag for keybindings which required special handling of "shift"+FOO as
FOO_BACKWARDS, but this has been removed now, so this special handling
is no longer necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=732296

js/ui/altTab.js
js/ui/ctrlAltTab.js
js/ui/status/keyboard.js
js/ui/switcherPopup.js

index 4960b55be5c377ff23a497b56bea55cf71c5225e..c734deaca770fa46406824938f318ce3b12955d9 100644 (file)
@@ -151,13 +151,13 @@ const AppSwitcherPopup = new Lang.Class({
                                  this._items[this._selectedIndex].cachedWindows.length);
     },
 
-    _keyPressHandler: function(keysym, backwards, action) {
+    _keyPressHandler: function(keysym, action) {
         if (action == Meta.KeyBindingAction.SWITCH_GROUP) {
-            this._select(this._selectedIndex, backwards ? this._previousWindow() : this._nextWindow());
+            this._select(this._selectedIndex, this._nextWindow());
         } else if (action == Meta.KeyBindingAction.SWITCH_GROUP_BACKWARD) {
             this._select(this._selectedIndex, this._previousWindow());
         } else if (action == Meta.KeyBindingAction.SWITCH_APPLICATIONS) {
-            this._select(backwards ? this._previous() : this._next());
+            this._select(this._next());
         } else if (action == Meta.KeyBindingAction.SWITCH_APPLICATIONS_BACKWARD) {
             this._select(this._previous());
         } else if (this._thumbnailsFocused) {
index 570c73da3d55a34154e98a5fe1b75e4da9968d34..fc884ae170c70a2d083fd05559fa1dcc6ec59b97 100644 (file)
@@ -156,11 +156,11 @@ const CtrlAltTabPopup = new Lang.Class({
         this._select(this._selectedIndex);
     },
 
-    _keyPressHandler: function(keysym, backwards, action) {
+    _keyPressHandler: function(keysym, action) {
         if (action == Meta.KeyBindingAction.SWITCH_PANELS)
-            this._select(backwards ? this._previous() : this._next());
+            this._select(this._next());
         else if (action == Meta.KeyBindingAction.SWITCH_PANELS_BACKWARD)
-            this._select(backwards ? this._next() : this._previous());
+            this._select(this._previous());
         else if (keysym == Clutter.Left)
             this._select(this._previous());
         else if (keysym == Clutter.Right)
index 51b90fa918d226fb5d0a88c42fffeffe407d67f6..888995999b5c83f4fae63125badee238e6583fde 100644 (file)
@@ -283,11 +283,11 @@ const InputSourcePopup = new Lang.Class({
         this._select(this._selectedIndex);
     },
 
-    _keyPressHandler: function(keysym, backwards, action) {
+    _keyPressHandler: function(keysym, action) {
         if (action == this._action)
-            this._select(backwards ? this._previous() : this._next());
+            this._select(this._next());
         else if (action == this._actionBackward)
-            this._select(backwards ? this._next() : this._previous());
+            this._select(this._previous());
         else if (keysym == Clutter.Left)
             this._select(this._previous());
         else if (keysym == Clutter.Right)
index 64df5fe541140f58c9f2ddb779232015eadcd507..2d4ec2ab320fd4f6e8e4153ff1249a794c0c0d6a 100644 (file)
@@ -184,13 +184,11 @@ const SwitcherPopup = new Lang.Class({
 
     _keyPressEvent: function(actor, event) {
         let keysym = event.get_key_symbol();
-        let event_state = event.get_state();
-        let backwards = event_state & Clutter.ModifierType.SHIFT_MASK;
-        let action = global.display.get_keybinding_action(event.get_key_code(), event_state);
+        let action = global.display.get_keybinding_action(event.get_key_code(), event.get_state());
 
         this._disableHover();
 
-        if (this._keyPressHandler(keysym, backwards, action) != Clutter.EVENT_PROPAGATE)
+        if (this._keyPressHandler(keysym, action) != Clutter.EVENT_PROPAGATE)
             return Clutter.EVENT_STOP;
 
         if (keysym == Clutter.Escape)